import Cookies from 'js-cookie'

const TokenKey = 'CTS_SYSTEM_TOKEN'
const Config = 'CTS_SYSTEM_CONFIG'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getConfig() {
  return JSON.parse(localStorage.getItem(Config))
}

export function setConfig(config) {
  return localStorage.setItem(Config, JSON.stringify(config))
}

export function removeConfig() {
  return localStorage.removeItem(Config)
}

